﻿using System;
using System.Collections.Generic;

namespace Sustainalytics.LongRunningTaskManager.Interface
{
    /// <summary>
    /// Factory for creating Long Running Tasks.
    /// </summary>
    public interface ILongRunningTaskFactory
    {
        /// <summary>
        /// Get all registered task types.
        /// </summary>
        /// <returns> All registered task types. </returns>
        IEnumerable<Type> GetLongRunningTaskTypes();

        /// <summary>
        /// Get long running task type.
        /// </summary>
        /// <param name="taskType"> Task type. </param>
        /// <returns> Type associated to the requested task type. </returns>
        Type GetLongRunningTaskType(LongRunningTaskTypeEnum taskType);

        /// <summary>
        /// Create long running task.
        /// </summary>
        /// <param name="taskType"> Task type. </param>
        /// <returns> Long running task. </returns>
        ILongRunningTask CreateLongRunningTask(LongRunningTaskTypeEnum taskType);
    }
}
